<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class getview {
    public $data = array();
    public function __set($name, $value) {
        $this->data[$name] = $value;
    }
    public function __get($name) {
        return $this->data[$name];
    }
}


class cloneview {
    public $view ; 
    
    public function __construct() {
        $this->view = new getview;
        return $this->view ;
    }
    public function setView($view,$value){
        $this->view->$view = $value;
        //return $this->view->$view ;
    }
   
}

$obj = new cloneview() ;
$obj->setView("ids", "image");
//echo $obj->ids ;

class DomainController  {
    public function setDisplay($name,$value){
        $this->$name = $value ;
        
    }
}
class templateView {
    public function __construct() {
        $arguments = func_get_args();
        
        if(!empty($arguments)) {
                echo 'here';
                print_r($arguments);
              $this->$arguments[0] = $arguments[1];
            
        }
    }
}
$o = new DomainController();
$o->setDisplay("id","23");
//echo $o->id  ; 

class tem {
    
   // public static $view ;
    public $render ;
  //  public $set ;
}
class view {
    private static $_view = null ;
    public $viel ;
    public function __construct() {
        echo 'call constructor';
        //$this->viel = new view ;
    }
    public static function setInstance ()
    {
        if (self::$_view === null) {
            self::$_view = new self;
        }

        return self::$_view;
    }
    public function set($name,$value){
        $name = $value;
        return $this;
    }
}
$v = new view() ;

//$tem = new tem();
 //tem::$view = new view();


//echo $tem->view->ids ;

//echo idsss;
        
//$newObj = new DomainController() ;
//$newObj->index();
//echo $newObj->view->data1 ;

?>
